package 集合.Collect集合遍历;

import java.util.ArrayList;
import java.util.Collection;
import java.util.function.Consumer;

public class Lambda {
    public static void main(String[] args) {
        Collection<String> a=new ArrayList<>();
        a.add("朱佳铖");
        a.add("李佳辉");
        a.add("启动器");
        a.forEach(new Consumer<String>() {
            @Override
            public void accept(String s) {
                System.out.println(s);
            }
        });
        a.forEach((s)-> System.out.println(s));
    }
}
